package com.xhwy.enums;

//订单状态枚举类
public enum OrderState {
    //1.提供当前枚举类的对象，多个对象之间用“，”隔开，末尾对象“；”结束
    OBLIGATION(0, "待付款"),
    WAITDELIVER(1, "待发货"),
    WAITRECEIVE(2, "待收货"),
    WAITCOMMENT(3 , "待评价");

    //2.声明枚举类的属性：private final修饰
    private final Integer stateCode;
    private final String stateDesc;

    //3.私有化类构造器
    private OrderState(Integer stateCode, String stateDesc){
        this.stateCode = stateCode;
        this.stateDesc = stateDesc;
    }

    public Integer getStateCode(){
        return stateCode;
    }
    public String getStateDesc(){
        return stateDesc;
    }

    @Override
    public String toString() {
        return "OrderState{" +
                "stateCode=" + stateCode +
                ", stateDesc='" + stateDesc + '\'' +
                '}';
    }
}
